package de.dlrg.wms.interfaces.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import wms2010.interfaces.devices.IDevice;

public abstract class IDeviceController {
	@Autowired
	private List<IDeviceCompetitionCallback> competitionCallbacks;

	protected void notifyButtonPressed(StopperEvent stopperEvent) {
			for (IDeviceCompetitionCallback competitionCallback : competitionCallbacks) {
				competitionCallback.stopEvent(stopperEvent);
			}
	}

	public abstract void registerDeviceControllerCallback(
			IDeviceControllerCallback iDeviceControllerCallback);

	public abstract void removeDeviceControllerCallback(
			IDeviceControllerCallback iDeviceControllerCallback);

	public abstract void startDiscovery();

	public abstract void stopDiscovery();

	public abstract List<IDevice> getAllDevices();

	public abstract String getName();

}